<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>银行系统 - 登录</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --error-color: #f72585;
    --text-light: #ffffff;
    --text-dark: #2b2d42;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(-45deg, #4361ee, #3a0ca3, #4895ef, #4cc9f0);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    overflow: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    width: 420px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) perspective(1000px) rotateY(0deg); }
    50% { transform: translateY(-20px) perspective(1000px) rotateY(5deg); }
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

button[type="submit"]:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

button[type="submit"]:hover::before {
    left: 100%;
}

.error {
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: shake 0.5s ease-in-out;
    padding: 12px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.floating-elements div {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    bottom: -150px;
    animation: floatBubble 15s linear infinite;
    border-radius: 50%;
}

@keyframes floatBubble {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

.floating-elements div:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.floating-elements div:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.floating-elements div:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.floating-elements div:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.floating-elements div:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.security-note {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

@media (max-width: 500px) {
    .login-container {
        width: 90%;
        padding: 30px 20px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}
</style>
</head>
<body>
    <div class="floating-elements">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
    
    <div class="login-container">
        <h2>银行系统登录</h2>
        
        <% if (request.getAttribute("error") != null) { %>
            <div class="error"><%= request.getAttribute("error") %></div>
        <% } %>
        
        <form action="login" method="post">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" placeholder="请输入用户名" required>
            </div>
            
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" placeholder="请输入密码" required>
            </div>
            
            <button type="submit">登录</button>
            
            <div style="text-align: center; margin-top: 20px;">
                <p>没有账户？<a href="register.jsp" style="color: rgba(255, 255, 255, 0.8); text-decoration: none; font-weight: 500;">立即注册</a></p>
            </div>
        </form>
        
        <p class="security-note">6666您的信息安全是我们的首要任务</p>
    </div>
</body>
</html>